﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DesignPattern.ChainofResponsibilityPattern
{
    //定义处理请求的接口,责任链模式
    public abstract class Handler
    {
        protected Handler successor;

        public void SetSuccessor(Handler successor)
        {
            this.successor = successor;
        }
        //处理请求抽象
        public abstract void HandlerRequest(int request);
    }
}
